package com.core.sdk.utils;

import android.content.Context;
import android.widget.Toast;

public class ToastUtil {

	public static final void show(Context context, String msg) {
		show(context, msg, Toast.LENGTH_SHORT);
	}

	public static final void show(Context context, int resourceId, int mode) {
		String msg = context.getResources().getString(resourceId);
		show(context, msg, mode);
	}

	public static final void show(Context context, int resourceId) {
		show(context, resourceId, Toast.LENGTH_SHORT);
	}

	public static final void show(Context context, String msg, int mode) {
		if (mode != Toast.LENGTH_LONG && mode != Toast.LENGTH_SHORT)
			mode = Toast.LENGTH_SHORT;
		Toast.makeText(context, msg, mode).show();
	}

}
